﻿// Xshell Functional Test Application
// 
// <copyright file="Program.cs" company="TaskyMedia LLC">
//   Copyright © 2010 TaskyMedia LLC
// </copyright>
namespace XshellTest
{
    using System;
    using System.Collections.Generic;

    using Xshell;

    /// <summary>
    /// Application entry point.
    /// </summary>
    internal class Program
    {
        /// <summary>
        /// Application entry point.
        /// </summary>
        /// <param name="args">The command line arguments.</param>
        internal static void Main(string[] args)
        {
            MetadataCache metaCache = new MetadataCache();
            XmlConfigReader xcr = new Xshell.XmlConfigReader(@"C:\xshell_test.xml");

            xcr.SetMetadataCache(metaCache);

            IEnumerable<IXsTaskSet> taskSets = xcr.ReadTaskSets();

            foreach (IXsTaskSet taskSet in taskSets)
            {
                if (taskSet.AreConditionsValid)
                {
                    taskSet.Execute();
                    break;
                }
            }

            Console.ReadLine();
        }
    }
}
